<!--
*Author：富行天下团队
 *
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/mall/Small_banner.js此处编写
 -->
<template>
  <div>
    <view-grid ref="grid" :columns="columns" :detail="detail" :editFormFields="editFormFields" :editFormFileds="editFormFields" :editFormOptions="editFormOptions"
      :searchFormFields="searchFormFields" :searchFormFileds="searchFormFields" :searchFormOptions="searchFormOptions" :table="table" :extend="extend">
    </view-grid>
  </div>
</template>

<script>
import extend from '@/extension/mall/Small_banner.js'
import ViewGrid from '@/components/basic/ViewGrid.vue'
var vueParam = {
  components: {
    ViewGrid,
  },
  data() {
    return {
      table: {
        key: 'id',
        footer: 'Foots',
        cnName: '轮播配置',
        name: 'Small_banner',
        url: '/SmallBanners/',
        sortName: 'createDate',
      },
      extend: extend,
      editFormFields: {
        name: '',
        merchantsCode: '',
        url: [],
        url_jump: '',
        user_id: '',
        status: '',
        sort: '',
        isShow: '',
        modifyDate: '',
        createDate: '',
        modifyID: '',
        createID: '',
        modifier: '',
        creator: '',
      },
      editFormOptions: [
        [
          { title: '名称', required: true, field: 'name', type: 'text', colSize: 12 },
          //{"title":"商户编码","required":true,"field":"merchantsCode","type":"text"},
        ],
        [
          //{"title":"图片地址","required":true,"field":"url","type":"img"},
          { title: '图片', maxSize: 1, field: 'url', type: 'imgupgrade' },
          { title: 'url 跳转地址', field: 'url_jump', type: 'text' },
        ],
        [
          { title: '排序', field: 'sort', type: 'text' },
          { title: '是否展示', required: true, field: 'isShow', type: 'switch' },
        ],
      ],
      searchFormFields: { name: '', merchantsCode: '', isShow: '', createDate: '', ModifyDate: '' },
      searchFormOptions: [
        [
          { title: '名称', field: 'name', type: 'like' },
          { title: '商户编码', field: 'merchantsCode', type: 'like' },
          { title: '是否展示', field: 'isShow', type: 'select', dataKey: 'enable' },
        ],
        [{ title: '创建时间', field: 'createDate', type: 'datetime' }],
      ],
      searchFormFields: { name: '', merchantsCode: '', isShow: '', createDate: '', modifyDate: '' },
      searchFormOptions: [
        [
          { title: '名称', field: 'name', type: 'like' },
          { title: '是否展示', field: 'isShow', type: 'select', dataKey: 'enable' },
          { title: '创建时间', field: 'createDate', type: 'datetime' },
        ],
      ],
      columns: [
        { field: 'id', title: '主键', type: 'int', width: 90, hidden: true, readonly: true, require: true, align: 'left' },
        { field: 'name', title: '名称', type: 'string', width: 90, align: 'left' },
        // {field:'merchantsCode',title:'商户编码',type:'string',width:220,align:'left'},
        { field: 'url', title: '轮播图', type: 'imgupgrade', width: 50, align: 'left' },
        { field: 'url_jump', title: '跳转地址', type: 'string', width: 220, align: 'left' },
        //{field:'user_id',title:'用户id',type:'int',width:90,align:'left'},
        //{field:'status',title:'状态',type:'string',width:90,align:'left'},
        { field: 'sort', title: '排序', type: 'int', width: 90, align: 'left' },
        { field: 'isShow', title: '是否展示', type: 'int', bind: { key: 'enable', data: [] }, width: 90, align: 'left' },
        { field: 'createDate', title: '创建时间', type: 'datetime', width: 160, align: 'left', sortable: true },
        //   {field:'createID',title:'创建人id',type:'int',width:90,hidden:true,align:'left'},
        { field: 'creator', title: '创建人名称', type: 'string', width: 130, align: 'left' },
        { field: 'modifier', title: '修改人名称', type: 'string', width: 130, align: 'left' },
        //  {field:'modifierID',title:'修改人id',type:'int',width:90,align:'left'},
        { field: 'modifyDate', title: '修改时间', type: 'datetime', width: 160, align: 'left', sortable: true },
        //    {field:'spare1',title:'备用',type:'string',width:220,align:'left'},
        //    {field:'spare2',title:'备用',type:'string',width:220,align:'left'},
        //    {field:'spare3',title:'备用',type:'string',width:220,align:'left'},
        //    {field:'spare4',title:'备用',type:'string',width:220,align:'left'},
        //    {field:'spare5',title:'备用',type:'string',width:220,align:'left'},
      ],
      detail: {
        cnName: '#detailCnName',
        columns: [],
        sortName: '',
        key: '',
      },
    }
  },
}
export default vueParam
</script>
